package com.yf.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.util.Log;

public class AppInstallationReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {
		String action = intent.getAction();
		Uri data = intent.getData();
		
		if ("android.intent.action.PACKAGE_INSTALL".equals(action)) {
			Log.v("Broadcast", "install" + data);
		} else if ("android.intent.action.PACKAGE_ADDED".equals(action)) {
			Log.v("Broadcast", "added" + data);
		} else if ("android.intent.action.PACKAGE_REMOVED".equals(action)) {
			Log.v("Broadcast", "removed" + data);
		}
	}

}
